package cs575.wido.action;

import cs575.client.GroupEx;
import cs575.wido.TaskListFactory;
import cs575.wido.GroupTaskListFactory;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import cs575.wido.ui.TaskWindow;

public class GroupTaskAction extends AbstractAction {
	private GroupEx group; 
	
	public GroupTaskAction(GroupEx group) {
		putValue(NAME, "Group Tasks");
		this.group = group;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		TaskListFactory factory = new GroupTaskListFactory(group);
		TaskWindow tw = new TaskWindow(factory);
		tw.setVisible(true);
	}
}
